import { observer } from "mobx-react-lite";
import { useRootStore } from '../store/index'
function Couter() {
    const { couterStore } = useRootStore()
    const { count, increment, decrement } = couterStore
    return (
        <div>
            <button onClick={increment}>+</button>
            <span>{count}</span>
            <button onClick={decrement}>-</button>
        </div>
    );
}
export default observer(Couter);
